/**
 * Created by Administrator on 2016/7/4 0004.
 */
directives.directive('loadingFor', ["$rootScope", "tools","$timeout", function ($rootScope, tools,$timeout) {
    return {
        restrict: 'AE',
        scope: {},
        replace: true,
        templateUrl: "/trend-new-BI/app/components/common/loadingFor/loadingForView.html",
        link: function (scope, element, attr) {


//            $rootScope.$broadcast("loading_Start_EV");
//            $rootScope.$broadcast("loading_End_EV");

            $rootScope.$on("loading_Start_EV",function(){
                $(element).show();
            });
            $rootScope.$on("loading_End_EV",function(){
                $(element).hide();
            });
        }
    }
}]);